<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

<?php
include_once("u_checkLogin.php");
include_once("u_getLoginInfo.php");
?>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../public/pic/f.png" type="image/x-icon">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>预约·历史记录</title>
    <link rel="stylesheet" href="../public/css/bootstrap.min.css">
    <link rel="stylesheet" href="../public/css/user_public.css">
    <script src="../public/js/bootstrap.bundle.min.js"></script>
    <link rel="stylesheet" href="css/user_order_history.css">
    <script src="js/u_order_history.js"></script>
</head>

<body>
    <!-- 头部信息开始 -->
    <header>
        <nav class="nav-top">
            <!-- 网站logo -->
            <div class="logo">
                <img src="../public/pic/logo-h-w.png" alt="动物家宠物医院">
            </div>
            <!-- 登录者信息 -->
            <div class="user-info">
                <div class="user-info-con">
                    <span>现在时间：<span id="nowtime"></span></span>
                    <script src="../public/js/getnowtime.js"></script>
                    <br>
                    <span>当前登录：<name>
                            <?php echo $userName; ?>
                        </name></span>
                </div>
                <a href="u_logout.php">点我退出</a>
            </div>
        </nav>
    </header>
    <!-- 头部信息结束 -->

    <!-- 主要内容开始 -->
    <main>
        <!-- 网页导航开始 -->
        <nav>
            <ul class="nav nav-tabs nav-main">
                <li class="nav-item nav-main-item">
                    <a class="nav-link active" aria-current="page" href="user_orderHistory.php">预约服务</a>
                </li>
                <li class="nav-item nav-main-item">
                    <a class="nav-link" href="user_index.php">主页</a>
                </li>
                <li class="nav-item nav-main-item">
                    <a class="nav-link" href="user_myinfo.php">个人信息</a>
                </li>
            </ul>
        </nav>
        <!-- 网页导航结束 -->
        <!-- 侧边导航栏开始 -->
        <div class="aside-navbar">
            <p>菜 单 栏</p>
            <ul>
                <a href="user_nowOrder.php">
                    <li>当前预约信息</li>
                </a>
                <a href="user_gotoOrder.php">
                    <li>预约挂号</li>
                </a>
                <a href="user_orderHistory.php">
                    <li class="li-c">预约历史记录</li>
                </a>
            </ul>
        </div>
        <!-- 侧边导航栏结束 -->
        <!-- 主要内容开始 -->
        <div class="main-content">
            <p class="main-content-title">预 约 历 史</p>
            <!-- 预约历史 -->
            <!-- 头部筛选表单 -->
            <nav class="navbar navbar-expand-lg bg-body-tertiary">
                <div class="container-fluid">
                    <div class="collapse navbar-collapse" id="navbarSupportedContent">
                        <form class="d-flex top-form">
                            <label for="b-date" class="top-tips">日期起：</label>
                            <input class="form-control me-2" type="date" id="b-date">
                            <label for="b-date" class="top-tips">日期至：</label>
                            <input class="form-control me-2" type="date" id="e-date">
                            <button class="btn btn-outline-success" type="button" id="subBtn"
                                onclick="sendInfo()">筛选</button>
                            <button class="btn btn-outline-success" type="button" id="subBtn"
                                onclick="refreshPage()">重选</button>
                        </form>
                    </div>
                </div>
            </nav>

            <!-- 预约历史信息列表 -->
            <div class="history-div">
                <div class="history-listtop-div">
                    <div class="list-div">宠物昵称</div>
                    <div class="list-div">预约服务</div>
                    <div class="list-div">预约医生</div>
                    <div class="list-div-l">预约备注</div>
                    <div class="list-div">提交时间</div>
                    <div class="list-div">预约时间</div>
                    <div class="list-div">状态</div>
                </div>

                <div class="history-content-div" id="history-content-div">
                    <?php include_once("u_getOrderHistory.php"); ?>
                </div>
            </div>

        </div>
        <!-- 主要内容结束 -->
    </main>
    <!-- 主要内容结束 -->

    <!-- 底部开始 -->
    <footer>
        <p>&copy; 2025 ANIMAL HOME PET HOSPITAL. All rights reserved.</p>
    </footer>
    <!-- 底部结束 -->
</body>

</html>